﻿using System;
using System.Data;

namespace DevMaker.SIC.Util {
    public static class DataReaderUtil {
        public static bool HasColumn(this IDataRecord dr, string columnName) {
            for (var i = 0; i < dr.FieldCount; i++) {
                if (dr.GetName(i).Equals(columnName, StringComparison.InvariantCultureIgnoreCase))
                    return true;
            }
            return false;
        }
    }
}
